﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UploadManage.aspx.cs" Inherits="Manage_System_UploadManage"
    EnableViewState="false" ValidateRequest="false" %>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
        A
        {
            cursor: default;
        }
        A:visited
        {
            text-decoration: none;
            color: 000000;
        }
        A:hover
        {
            text-decoration: none;
        }
        A:link
        {
            text-decoration: none;
            color: 000000;
        }
        BODY
        {
            font-family: Tahoma;
            font-size: 8pt;
            scrollbar-face-color: #ffffff;
            scrollbar-highlight-color: #acb0b5;
            scrollbar-shadow-color: #acb0b5;
            scrollbar-3dlight-color: #ffffff;
            scrollbar-arrow-color: #acb0b5;
            scrollbar-track-color: #ffffff;
            scrollbar-darkshadow-color: #ffffff;
            scrollbar-base-color: #acb0b5;
        }
        TD
        {
            font-family: Tahoma;
            font-size: 8pt;
        }
        DIV
        {
            cursor: default;
            font-family: Tahoma;
            font-size: 8pt;
        }
        select
        {
            border-width: 1;
            border-color: #000000;
            background-color: #efefef;
            font-family: Tahoma;
            font-size: 8pt;
            font-style: bold;
        }
        .botton
        {
            font-size: 8pt;
            background: url(botton_01.gif) no-repeat right bottom;
            font-family: Tahoma;
            color: #7E8083;
            border: 1px solid #ACB0B5;
        }
        .botton1
        {
            font-size: 8pt;
            font-family: Tahoma;
            border: 1px solid #ACB0B5;
        }
        INPUT
        {
            border-top-width: 1px;
            padding-right: 1px;
            padding-left: 1px;
            border-left-width: 1px;
            font-size: 8pt;
            border-left-color: #cccccc;
            border-bottom-width: 1px;
            border-bottom-color: #cccccc;
            padding-bottom: 1px;
            border-top-color: #cccccc;
            padding-top: 1px;
            height: 18px;
            border-right-width: 1px;
            border-right-color: #cccccc;
            font-family: Tahoma;
        }
        DIV.imagespacer
        {
            float: left;
            margin: 5px;
            overflow: hidden;
            width: 90px;
            padding-top: 0px;
            height: 90px;
            text-align: center;
        }
        DIV.imageholder
        {
            border-right: #cccccc 1px solid;
            padding-right: 0px;
            border-top: #cccccc 1px solid;
            padding-left: 0px;
            padding-bottom: 0px;
            margin: 0px;
            vertical-align: middle;
            border-left: #cccccc 1px solid;
            width: 60px;
            padding-top: 15px;
            border-bottom: #cccccc 1px solid;
            height: 60px;
            text-align: center;
        }
        DIV.titleHolder
        {
            width: 100%;
            padding-top: 2px;
            height: 20px;
            text-align: center;
        }
    </style>
</head>
<body style="overflow: auto" leftmargin="0" topmargin="0">
    <!-- bgcolor="#e5eaf0" -->
    <div style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1">
        <table width="98%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td valign="top" height="45">
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <form id="form1" name="form1" method="get" action="">
                        <input id="ObjectNum" type="hidden" name="Hidden2" runat="server">
                        <input id="FolderUrl" type="hidden" name="hidden" runat="server">
                        <input id="FolderPath" type="hidden" name="FolderPath" runat="server">
                        <tr>
                            <td align="right">
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td align="center" width="180">
                                            <div id="msviLocalToolbar1">
                                                <table cellspacing="0" cellpadding="0" width="95%" border="0">
                                                    <tr align="center">
                                                        <td width="24%" height="30">
                                                            <a href="?index">根目录</a>
                                                        </td>
                                                        <td>
                                                            <font color="#cecfd0">|</font>
                                                        </td>
                                                        <td class="lt0" width="18%">
                                                            <a onclick="window.location.reload();return false;" href="#">刷新</a>
                                                        </td>
                                                        <td>
                                                            <font color="#cecfd0">|</font>
                                                        </td>
                                                        <td width="18%" height="20">
                                                            <a onclick="try{history.go(-1);}catch(e){window.location=('?index');}" href="#">后退</a>
                                                        </td>
                                                        <td>
                                                            <font color="#cecfd0">|</font>
                                                        </td>
                                                        <td width="18%">
                                                            <asp:HyperLink ID="goup" runat="server">向上</asp:HyperLink>
                                                        </td>
                                                        <td>
                                                            <font color="#cecfd0">|</font>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                        <td width="30">
                                            <font color="#7e8083">地址:</font>
                                        </td>
                                        <td>
                                            <input id="NewFolder" style="width: 100%" type="text" name="text" runat="server">
                                        </td>
                                        <td width="25">
                                            <input type="submit" name="Submit" value="→">
                                        </td>
                                        <td width="90">
                                            <select id="DiskList" onchange="window.location=('?NewFolder='+options[selectedIndex].value)"
                                                name="Select1" runat="server">
                                            </select>
                                        </td>
                                        <td width="30">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td height="2" align="right" bgcolor="#ACB0B5">
                                <img height="1" src="images/spacer.gif" width="1">
                            </td>
                        </tr>
                        </form>
                    </table>
                </td>
            </tr>
            <tr>
                <td valign="top" bgcolor="#ffffff">
                    <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td valign="top" width="200">
                                <div style="overflow: auto; width: 200px; height: 100%">
                                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                        <tr>
                                            <td valign="top" height="76">
                                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                    <tr>
                                                        <td width="10" height="50">
                                                            &nbsp;
                                                        </td>
                                                        <td valign="top" align="left">
                                                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                                <tr>
                                                                    <td valign="bottom" height="40">
                                                                        <asp:Label ID="leftpic" runat="server"></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="10">
                                                            <img height="1" src="images/spacer.gif" width="10">
                                                        </td>
                                                        <td style="font-weight: bold; line-height: 1.1; font-family: Tahoma;" valign="bottom">
                                                            <span style="width: 190px; word-break: break-all;">
                                                                <asp:Label ID="ListLabel" runat="server"></asp:Label></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="10" height="10">
                                                            <hr size="2" color="#6699CC" noshade>
                                                        </td>
                                                        <td>
                                                            <hr size="2" color="#6699CC" noshade>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top">
                                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                    <tr>
                                                        <td width="10" height="25">
                                                            <img height="1" src="images/spacer.gif" width="10">
                                                        </td>
                                                        <td>
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="10" height="40">
                                                            &nbsp;
                                                        </td>
                                                        <td>
                                                            <span id="filename" style="font-size: 8pt; line-height: 1.3; font-family: Tahoma">
                                                            </span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="10">
                                                            &nbsp;
                                                        </td>
                                                        <td>
                                                            <span id="fileinfo" style="font-size: 8pt; font-family: Tahoma"></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td height="20">
                                                            &nbsp;
                                                        </td>
                                                        <td>
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                            <td onselectstart="return false;" onclick="return BodyClick()" valign="top">
                                <div style="overflow: auto; width: 100%; height: 100%">
                                    <font face="宋体">
                                        <asp:Literal ID="fileShow" runat="server"></asp:Literal></font></div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="1" bgcolor="#ACB0B5">
                </td>
            </tr>
            <tr>
                <td height="1" valign="top" bgcolor="#F7FAFF">
                </td>
            </tr>
            <tr>
                <td valign="top" height="20">
                    <table cellspacing="1" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <form id="form2" name="form2" action="UploadManage.aspx" runat="server">
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <input id="FolderPath2" type="hidden" name="FolderPath2" runat="server">
                                    <tr>
                                        <td height="30">
                                            <asp:Button ID="Button12" runat="server" CssClass="botton" Text="登录系统" Width="70px"
                                                OnClick="Button12_Click"></asp:Button>
                                            <asp:TextBox ID="TextBox3" runat="server" Width="80px" Visible="False" TextMode="Password"
                                                value=""></asp:TextBox>
                                            <asp:Button ID="Button13" runat="server" CssClass="botton1" Text="登录" Visible="False"
                                                OnClick="Button13_Click"></asp:Button>
                                            <asp:Button ID="Button3" runat="server" CssClass="botton" Text="下载文件" Width="70px"
                                                OnClick="Button3_Click"></asp:Button>
                                            <asp:Button ID="Button10" runat="server" CssClass="botton" Text="上传文件" Width="70px"
                                                OnClick="Button10_Click"></asp:Button><input class="botton1" id="UploadFile" style="display: none;
                                                    font-size: 9pt" type="file" name="File1" runat="server"><asp:Button ID="Button4"
                                                        runat="server" CssClass="botton1" Text="上传" Visible="False" CausesValidation="False"
                                                        OnClick="Button4_Click"></asp:Button>
                                            <asp:Button ID="Button11" runat="server" CssClass="botton" Text="新建..." Width="70px"
                                                OnClick="Button11_Click"></asp:Button>
                                            <asp:TextBox ID="TextBox2" runat="server" CssClass="botton1" Width="80px" Visible="False"></asp:TextBox>
                                            <asp:Button ID="Button1" runat="server" CssClass="botton1" Text="新建文件" Width="60px"
                                                Visible="False" OnClick="Button1_Click"></asp:Button>
                                            <asp:Button ID="Button2" runat="server" CssClass="botton1" Text="新建文件夹" Width="70px"
                                                Visible="False" OnClick="Button2_Click"></asp:Button>
                                            <asp:Button ID="Button5" runat="server" CssClass="botton" Text="删除文件" Width="70px"
                                                OnClick="Button5_Click"></asp:Button>
                                            <asp:Button ID="Button6" runat="server" CssClass="botton" Text="删除文件夹" Width="80px"
                                                OnClick="Button6_Click"></asp:Button>
                                            <input type="button" id="edit" value="文本编辑" class="botton" onclick="openeditor()"
                                                runat="server" visible="false">
                                            <asp:Button ID="Button14" runat="server" CssClass="botton" Text="重 命 名" Width="70px"
                                                OnClick="Button14_Click"></asp:Button>
                                            <asp:TextBox ID="TextBox4" runat="server" CssClass="botton1" Width="80px" Visible="False"></asp:TextBox>
                                            <asp:Button ID="Button15" runat="server" CssClass="botton1" Text="重命名" Width="60px"
                                                Visible="False" OnClick="Button15_Click"></asp:Button>
                                            <asp:Button ID="Button7" runat="server" CssClass="botton1" Text="复制" Width="50px"
                                                OnClick="Button7_Click" Visible="false"></asp:Button>
                                            <asp:Button ID="Button8" runat="server" CssClass="botton1" Text="剪切" Width="50px"
                                                OnClick="Button8_Click" Visible="false"></asp:Button>
                                            <asp:Button ID="Button9" runat="server" CssClass="botton1" Text="粘贴" Width="50px"
                                                OnClick="Button9_Click" Visible="false"></asp:Button>
                                            <input id="CurrentFile" type="hidden" name="CurrentFile" runat="server">
                                            <input id="CurrentFolder" type="hidden" name="CurrentFolder" runat="server">
                                        </td>
                                        <td style="color: red" align="right">
                                            &nbsp;
                                            <asp:Label ID="ErrorText" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                                </form>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <script language="JavaScript">
var lastDiv = null;var FileNum;var FolderNum;var ClickArea = 0;window.status = "就绪"
FolderNum = form1.ObjectNum.value.split("|")[0];FileNum = form1.ObjectNum.value.split("|")[1];
filename.innerHTML = "共计:&nbsp;"+FileNum+"&nbsp;个对象<br><br>";
fileinfo.innerHTML = "目录:&nbsp;"+FolderNum+"&nbsp;个<br><br>文件:&nbsp;"+(FileNum-FolderNum)+"&nbsp;个";
if(typeof form2.Button7!="undefined"){form2.Button7.disabled = true;form2.Button8.disabled = true;}	
document.form2.CurrentFolder.value = "";document.form2.CurrentFile.value = "";
function BodyClick(){if(ClickArea == 1){ClickArea = 0;return;}else{
filename.innerHTML = "共计:&nbsp;"+FileNum+"&nbsp;个对象<br><br>";fileinfo.innerHTML = "目录:&nbsp;"+FolderNum+"&nbsp;个<br><br>文件:&nbsp;"+(FileNum-FolderNum)+"&nbsp;个";	
if (lastDiv){lastDiv.style.border = "1 solid #CCCCCC";lastDiv.style.background = "white";}
document.form2.CurrentFile.value="";document.form2.CurrentFolder.value="";
if(typeof form2.Button7!="undefined"){form2.Button7.disabled = true;form2.Button8.disabled = true;}
window.status = "就绪";return;}}				
function SelectDiv(theDiv,FileName,lFileName,lFileSize,lFileModify,lFileProperty,isFile)
{if (lastDiv) {lastDiv.style.border = "1 solid #CCCCCC";lastDiv.style.background = "white";}
lastDiv = theDiv;theDiv.style.border = "1 solid #316AC5";theDiv.style.background = "#EBF0FA";
if(isFile == 1){document.form2.CurrentFile.value = FileName;document.form2.CurrentFolder.value = "";
window.status = "文件「"+FileName+"」被选中!";}
else{document.form2.CurrentFolder.value = FileName;document.form2.CurrentFile.value = "";
window.status = "文件夹「"+FileName+"」被选中!";}	
filename.innerHTML = "<b>"+FileName+"</b><br>"+lFileName+"<br><br>"
fileinfo.innerHTML = "修改时间:&nbsp;"+lFileModify+"<br><br>大小:&nbsp;"+lFileSize+"<br><br>"+lFileProperty;
ClickArea = 1;
if(typeof form2.Button7!="undefined"){form2.Button7.disabled = false;form2.Button8.disabled = false;}
return;}		
function OpenObject(FileName,isFile){
if(isFile == 1){
if(typeof form2.Button3=="undefined")alert("登录后才可以下载文件！");
else form2.Button3.click();
}else{
window.location=("?NewFolder="+form1.FolderUrl.value+FileName+"/");}}
function GetFileName(){var str = this.location.href;return str.match(/\/([^\?/]*)(\?|$)/)[1];}
document.form1.NewFolder.value = ""+document.form1.FolderPath.value;
function openeditor(){
if(form2.CurrentFile.value==""){alert("请选取一个文件！");return false;}
window.open("about:blank",'editor','scrollbars=1,menubar=0,status=0,width=700,height=500,left=50,top=110,resizable=1');window.open("?Action=edit&url="+form1.FolderUrl.value+"\\"+form2.CurrentFile.value,'editor','scrollbars=1,menubar=0,status=0,width=700,height=500,left=50,top=110,resizable=1');}
            </script>
            </tr></table>
    </div>
</body>
</html>
